import request from '@/utils/request'

// 查询库存期初列表
export function listBizInventoryOpening (query) {
  return request({
    url: '/biz/bizInventoryOpening/list',
    method: 'get',
    params: query
  })
}

// 查询库存期初详细
export function getBizInventoryOpening (id) {
  return request({
    url: '/biz/bizInventoryOpening/' + id,
    method: 'get'
  })
}

// 新增库存期初
export function addBizInventoryOpening (data) {
  return request({
    url: '/biz/bizInventoryOpening',
    method: 'post',
    data: data
  })
}

// 修改库存期初
export function updateBizInventoryOpening (data) {
  return request({
    url: '/biz/bizInventoryOpening',
    method: 'put',
    data: data
  })
}

// 删除库存期初
export function delBizInventoryOpening (id) {
  return request({
    url: '/biz/bizInventoryOpening/' + id,
    method: 'delete'
  })
}


// 导出库存期初
export function exportBizInventoryOpening (query) {
  return request({
    url: '/biz/bizInventoryOpening/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/biz/bizInventoryOpening/getInitData/' + dictTypes,
    method: 'get'
  })
}


//客户应收期初审核
export function auditBizInventoryOpening (id) {
  return request({
    url: '/biz/bizInventoryOpening/audit/' + id,
    method: 'get'
  })
}

//客户应收期初反审核
export function doAuditBizInventoryOpening (id) {
  return request({
    url: '/biz/bizInventoryOpening/doAudit/' + id,
    method: 'get'
  })
}
//客户应收期初反审核
export function importTemplate () {
  return request({
    url: '/biz/bizProduct/importTemplate',
    method: 'get'
  })
}
